/*
* Valentine Gladstein
* SOLAR ID 108731583
* Homework #3
* CSE214
* Recitation 03-Phil Ammirato
* Grading TA: Yanjie Li
*/

import java.io.*;
import java.util.*;

public class MyLinkedList { 

    public  MyNode head;
    public  MyNode tail;
    public  MyNode cur;

    public MyLinkedList() {
	head = null;
	tail = null;
	cur = null;
    }

    public void add(String city) {
        MyNode newNode = new MyNode();
	newNode.setData(city);
        if (head == null){
            head = newNode;
            tail = newNode;
	    tail.setNext(null);
            cur = newNode;
            return;
	}
	else {
	    tail.setNext(newNode);
	    newNode.setNext(null);
	    tail = newNode;
        }
    }
}
